package com.mswyt.utils.test.excel;

/**
 * @ClassName: ExcelService
 * @Description:
 */

import com.mswyt.utils.msExcel.annotation.MsExcelRewrite;
import com.mswyt.utils.test.pb.bean.MsUserExcel;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@MsExcelRewrite(targetParam = "className")
@Service
public class MsExcelService {
    //模拟拦截默认的查询方法。
    @MsExcelRewrite(targetParam = "dynamic",waterMarkClass = MyWaterMark.class)
    public void dynamic(List<Map<String, Object>> data, List<String> headers) {
        System.err.println("--222222--");
    }

    //模拟拦截默认的查询方法。
    @MsExcelRewrite(targetParam = "template")
    public void template(List<Map<String, Object>> data, Map<String, Object> otherVal) {
        System.err.println("----");
    }

    //模拟拦截默认的查询方法。
    @MsExcelRewrite(targetParam = "import", entityClass = MsUserExcel.class)
    public Object importExcel(List<MsUserExcel> data) {
        //这里已经获取到解析的数据，处理自己业务即可
        return data;
    }



}
